/*******************************************************************
 *
 * Copyright (C), 2021-2022, LS, All rights reserved.
 *
 * Author      : 
 * Create Time : 2020-11-02
 * Version     : v0.1
 * Description : 
 *******************************************************************/
#ifndef _APP_DISPLAY_H_
#define _APP_DISPLAY_H_

/*----------------------------Head file----------------------------*/
#include "stdint.h"
#include "stdbool.h"
#include "hal_display.h"
#include "app_disp_img_draw.h"
#include "ls_ble_file_text_api.h"

/*----------------------------macro file---------------------------*/
#define COLOR_WHITE     0xFFFF
#define COLOR_BLACK     0

#define app_disp_backlight_set          hal_disp_set_backlight_pin
#define app_disp_backlight_state_get    hal_disp_backlight_state_get

/*----------------------------type define--------------------------*/

/*--------------------------var declarative------------------------*/

/*-------------------------func declarative------------------------*/
extern int app_disp_init(void);
extern void app_disp_deinit(void);
extern bool app_disp_init_state_get(void);
extern void app_disp_rect_draw(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint16_t color);

extern void app_disp_image_draw(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint32_t flash_addr);
extern void app_disp_image_draw_ex(uint16_t x, uint16_t y, uint16_t width, uint16_t height, const uint8_t* img_src);

extern void app_disp_qrcode_draw(uint16_t x1, uint16_t y1, uint8_t point_width, const char *str);
extern void app_display_text_string(uint16_t x, uint16_t y, text_info_t* info, uint32_t addr);

/*-----------------------------------------------------------------*/


#endif // _APP_DISPLAY_H_

